<template>
	<div class="user">
		<div class="userBg">
			<p class="userWord">登录网易云音乐，可以享受无限收藏的乐趣，并且无限同步到手机</p>
			<a href="#" class="login">用户登录</a>
		</div>
	</div>
	<div class="singer" style="margin-top: 15px;">
		<h3 class="singerNav d-flex justify-content-between">
			<span class="f1">入驻歌手</span>
			<a href="#" class="more">查看更多 ></a>
		</h3>
		<ul class="singerCenter">
			<li v-for="(item,index) in singerData.singerList">
				<a href="#" class="item d-flex">
					<div class="head"><img :src="item.cover"></div>
					<div class="des">
						<span class="des-title">{{item.title}}</span>
						<p class="des-detail">{{item.des}}</p>
					</div>
				</a>
			</li>
		</ul>
		<div class="singerApply">
			<a href="#" class="applyBtn"><p>申请成为网易云音乐人</p></a>
		</div>
	</div>
	<div class="anchor">
		<h3 class="singerNav" style="font-weight: bold;">热门主播</h3>
		<ul class="anchorCenter">
			<li v-for="(item,index) in singerData.anchorList" class="d-flex">
				<a href="#" class="anchorCover"><img :src="item.cover"></a>
				<div class="anchorDes">
					<a href="#" class="des-name">{{item.title}}</a>
					<p class="anchor-des">{{item.des}}</p>
				</div>
			</li>
		</ul>
	</div>
</template>

<script setup>
	import {reactive} from 'vue'
	import axios from 'axios'
	
	const singerData=reactive({
		singerList:[],
		anchorList:[]
	})
	axios.get(`https://mock.apifox.cn/m1/2897896-0-default/singer`)
	.then(function (response) {
		singerData.singerList=response.data.singer;
		singerData.anchorList=response.data.anchor;
		// console.log(singerData.singerList);
	})
</script>

<style scoped>
	a{
		text-decoration: none;
	}
	ul,li,ol{
		list-style: none;
		margin: 0;
		padding: 0;
	}
	h3,p{
		font-size: 12px;
		margin: 0;
		padding: 0;
	}
	.applyBtn,.applyBtn p{
		background: url('../assets/footer/button2.png') no-repeat 0 9999px;
	}
	.userBg,.login{
		background: url('../assets/hotImg/index.png') no-repeat;
	}
	.userBg{
		height: 126px;
		padding-top: 0;
	}
	.userWord{
		width: 205px;
		margin: 0 auto;
		padding: 16px 0;
		line-height: 22px;
		color: #666;
		font-size: 12px;
	}
	.login{
		margin: 0 auto;
		display: block;
		width: 100px;
		height: 31px;
		line-height: 31px;
		text-align: center;
		color: #fff;
		font-size: 12px;
		text-shadow: 0 1px 0 #8a060b;
		background-position: 0 -195px;
	}
	.login:hover{
		background-position: -110px -195px;
	}
	/* 入驻歌手 */
	.singerNav{
		height: 23px;
		margin: 0 18px;
		border-bottom: 1px solid #ccc;
	}
	.singerNav .f1{
		font-weight: bold;
		color: #333;
	}
	.singerNav .more{
		color: #666;
	}
	.singerCenter{
		margin: 6px 0 14px 20px;
	}
	.singerCenter li{
		margin-top: 14px;
	}
	.item:hover{
		background: #eeeeee;
	}
	.item{
		width: 210px;
		height: 62px;
		background: #fafafa;
	}
	.head{
		width: 62px;
		height: 62px;
	}
	.des{
		width: 147px;
		height: 60px;
		padding-left: 14px;
		border: 1px solid #e9e9e9;
		border-left: none;
	}
	.des-title{
		display: inline-block;
		margin-top: 8px;
		font-size: 14px;
		font-weight: bold;
		color: #333;
	}
	.des-detail{
		width: 90%;
		margin-top: 8px;
		color: #666;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	/* 申请网易云 */
	.applyBtn{
		width: 210px;
		height: 31px;
		display: inline-block;
		margin-left: 20px;
		border-radius: 4px;
		color: #333;
		background-position: right -100px;
	}
	.applyBtn:hover{
		color: #333;
		background-position: right -182px;
	}
	.applyBtn p{
		width: 205px;
		height: 31px;
		line-height: 31px;
		text-align: center;
		font-weight: bold;
		color: #333;
		background-position: 0 -59px;
		padding: 0 20px;
	}
	/* 热门主播 */
	.anchor{
		margin-top: 30px;
	}
	.anchorCenter{
		margin: 20px 0 0 20px;
	}
	.anchorCenter li{
		width: 210px;
		height: 50px;
	}
	.anchorCover{
		width: 40px;
		margin-right: 10px;
	}
	.anchorDes{
		width: 160px;
		line-height: 21px;
	}
	.des-name{
		color: #000;
		font-size: 12px;
	}
	.des-name:hover,.more:hover{
		text-decoration: underline;
	}
	.anchor-des{
		width: 100%;
		color: #666;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
</style>